package com.fenghuajueli.module_home;

import android.content.Intent;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.fenghuajueli.libbasecoreui.ui.AboutUsActivity;
import com.fenghuajueli.libbasecoreui.ui.FeedBackActivity;
import com.fenghuajueli.libbasecoreui.ui.PrivacyWebActivity;
import com.fenghuajueli.libbasecoreui.utils.PrivacyConstantsUtils;
import com.fenghuajueli.libbasecoreui.viewmodel.BaseViewModelFragment2;
import com.fenghuajueli.module_home.databinding.FragmentMinePageBinding;
import com.fenghuajueli.module_home.model.HomePageModel;
import com.fenghuajueli.module_route.HomeModuleRoute;

@Route(path = HomeModuleRoute.MINE_PAGE)
public class MinePageFragment extends BaseViewModelFragment2<HomePageModel, FragmentMinePageBinding> {
    @Override
    protected HomePageModel createViewModel() {
        return new HomePageModel();
    }

    @Override
    protected FragmentMinePageBinding createViewBinding() {
        return FragmentMinePageBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void initView(View containerView) {
        binding.rlFk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), FeedBackActivity.class));
            }
        });

        binding.rlAboutAs.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), AboutUsActivity.class));
            }
        });
        binding.rlYs.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PrivacyWebActivity.start(getContext(), PrivacyConstantsUtils.ProtocolType.PRIVACY);
            }
        });
        binding.rlYhxy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PrivacyWebActivity.start(getContext(), PrivacyConstantsUtils.ProtocolType.USER_PROTOCOL);
            }
        });
    }

    @Override
    protected void initData() {

    }
}
